<?
class clsTradeName extends yellowpages{
 function showResult(){
  $a = func_get_args();
  $sql = "SELECT trade_id, trade_name, count(trade_id) FROM trade_name,id_trade 
		  WHERE (trade_name.trade_id=id_trade.trade_name_1) and (trade_name like '".$a[0]."%')
		  group by trade_name order by trade_name
		  ";
// echo($sql);
  $result = mysql_query($sql) or die("counld not query");
  $t='';
  while($rs=mysql_fetch_array($result,MYSQL_NUM)){
   $t.="<tr><td><font class=colss style=padding-left:10px>» </font><a class=text-grey href=puttype.php?ids=$a[2]&kind=trade&key=$rs[0]&word=".base64_encode($rs[1])."&lang=$a[3] title='$rs[1]'>$rs[1]</a> ($rs[2])</td></tr>";
  }
  $_SESSION['brd'] = $t;
  return $t;
 }
}
?>